import { sessionGet } from '@/utils/sessionStorage'
const enum ROUTER_ENUM{
  LABRARY_QUERY='LABRARY_QUERY',
  LABRARY_CHANGE='LABRARY_CHANGE',
  HOME='HOME',
  HOME_USERS='HOME_USERS',
  BORROW_RECORDSS='BORROW_RECORDSS',
  BORROW_REVIEW='BORROW_REVIEW',
  ROLE_LIST='ROLE_LIST',
  ROLE_CHANGE='ROLE_CHANGE',
  SETTINGS_CONTROLS='SETTINGS_CONTROLS',
  SETTINGS_MENU='SETTINGS_MENU',
}
const  routerEnumeration=  {
  [ROUTER_ENUM.LABRARY_QUERY]: '图书查询',
  [ROUTER_ENUM.LABRARY_CHANGE]: '书籍变更',
  [ROUTER_ENUM.HOME]: '首页',
  [ROUTER_ENUM.HOME_USERS]: '用户中心',
  [ROUTER_ENUM.BORROW_RECORDSS]: '借阅记录',
  [ROUTER_ENUM.BORROW_REVIEW]: '图书评论',
  [ROUTER_ENUM.ROLE_LIST]: '用户列表',
  [ROUTER_ENUM.ROLE_CHANGE]: '权限变更',
  [ROUTER_ENUM.SETTINGS_CONTROLS]: '系统操作',
  [ROUTER_ENUM.SETTINGS_MENU]: '菜单管理'
}

const routerPath = {
  [ROUTER_ENUM.LABRARY_QUERY]: '/labrary/query',
  [ROUTER_ENUM.LABRARY_CHANGE]: '/labrary/change',
  [ROUTER_ENUM.HOME]: '/home',
  [ROUTER_ENUM.HOME_USERS]: '/home/users',
  [ROUTER_ENUM.BORROW_RECORDSS]: '/borrow/recordss',
  [ROUTER_ENUM.BORROW_REVIEW]: '/borrow/review',
  [ROUTER_ENUM.ROLE_LIST]: '/role/list',
  [ROUTER_ENUM.ROLE_CHANGE]: '/role/change',
  [ROUTER_ENUM.SETTINGS_CONTROLS]: '/settiongs/controls',
  [ROUTER_ENUM.SETTINGS_MENU]: '/settiongs/menu'
}
/* const roleList = {
  HOME: {
    name: '首页',
    icon: '',
    role: { HOME_USERS: '用户中心' }
  },
  LABRARY: {
    name: '图书管理',
    icon: '',
    role: { LABRARY_QUERY: '图书查询', LABRARY_CHANGE: '书籍变更' }
  },
  BORROW: {
    name: '借阅信息',
    icon: '',
    role: { BORROW_RECORDSS: '借阅记录', BORROW_REVIEW: '图书评论' }
  },
  ROLE: {
    name: '用户信息',
    icon: '',
    role: { ROLE_LIST: '用户列表', ROLE_CHANGE: '权限变更' }
  },
  SETTINGS: {
    name: '系统设置',
    icon: '',
    role: { SETTINGS_CONTROLS: '系统操作', SETTINGS_MENU: '菜单管理' }
  },
  BOOKS: {
    name: '书籍借阅',
    icon: '',
    role: { BOOKS_QUERY: '书籍查询', BOOKS_CHANGE: '书籍管理' }
  }
} */
const roleList = sessionGet<object>('_menu');

export { routerEnumeration, routerPath, roleList,ROUTER_ENUM }
